/**
 * 相机脚本
 * 相机自我移动
 */
var global = require("Global")
cc.Class({
    extends: cc.Component,

    properties: {
    
        MoveY : { 
            default: 3,        // The default value will be used only when the component attaching
            type: cc.Float, // optional, default is typeof default
            serializable: true,
        },
      
    },

  

    start () {
      var levelCfg  = global.getLevelOtherConfig(global.curlevel);
      if(levelCfg == null )
      {
        this.MoveY = 10;
      } else
      {
        this.MoveY = levelCfg.canvasSpeed;
      }
    },

     update (dt) {
        var levelCfg  = global.getLevelOtherConfig(global.curlevel);
        if(levelCfg == null )
        {
          this.MoveY = 4;
        } else
        {
          this.MoveY = levelCfg.canvasSpeed
        }
         this.node.y += this.MoveY*dt*60;
     },
});
